import { Component, OnInit } from '@angular/core';
import { BladeService } from "../../../shared/blade.service";
import { BladeData } from "../../../shared/blade/blade-data";
import { Observable } from "rxjs/Observable";
import { Blade } from "../../../shared/blade/blade.model";
import { UserfarmAlarmconfigListComponent } from "./userfarm-alarmconfig-list/userfarm-alarmconfig-list.component";

@Component({
  selector: 'app-user-farm-alarmconfig',
  templateUrl: './user-farm-alarmconfig.component.html',
  styleUrls: ['./user-farm-alarmconfig.component.css'],
  providers: [BladeService]
})
export class UserFarmAlarmconfigComponent implements OnInit {

 constructor(public bladeService: BladeService) { }

  ngOnInit() {
    this.createFarmListtBlade()
  }
  /**
   * 创建风场报警提示弹出层
   * 
   * 
   * @memberof DicComponent
   */
  createFarmListtBlade() {
    let data: BladeData = new BladeData();
    data.id = "userfarmAlarmconfigList";
    data.title = "风场报警配置";    
    data.isClosingDisabled = true;
    let userfarmAlarmconfigBlade = this.bladeService.createBlade(UserfarmAlarmconfigListComponent, data);
    this.bladeService.showBlade(userfarmAlarmconfigBlade);
  }
   /**
   * 是否可以离开
   * 
   * 
   * @memberof DicComponent
   */
  canDeactivate(): boolean | Observable<boolean> | Promise<boolean> {
    return true;
  }

}



// WEBPACK FOOTER //
// ./src/app/module/basic/user-farm-alarmconfig/user-farm-alarmconfig.component.ts